<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= 'Astra:' %> <%= controller.controller_name.humanize %></title>
  <%= stylesheet_link_tag 'color', 'layout', 'typography' %>
</head>
<body>

  <div id="wrapper">

    <p id="skip"><%= link_to 'Skip to main content', '#main' %></p>

    <div id="header">
      <ul id="tool_bar">
        <li id="login_info"><%= login_info %></li>
        <li id="login_or_logout"><%= login_or_logout %></li>
      </ul>
    </div>

    <% unless controller.controller_name == 'home' -%>
    <div id="bread_crumb">
      <ul>
        <li><%= link_to 'Home', :controller => 'home', :action => 'index' %> &#x25BA; </li>
        <li><%= link_to controller.controller_name.humanize, :action => 'index' %> &#x25BA; </li>
        <li><%= controller.action_name.humanize %></li>
      </ul>
    </div>
    <% end -%>

    <div id="main_nav">

      <div class="side_block">
        <div class="header"><h2>Main Menu</h2></div>
        <ul>
          <li><%= link_to 'Courses', :controller => 'courses', :action => 'list' %></li>
          <li><%= link_to 'Users', :controller => 'users', :action => 'list' %></li>
          <li><%= link_to 'LOs Repository', :controller => 'scorm', :action => 'list' %></li>
        </ul>
      </div>

      <% if controller.controller_name == 'courses' && @course -%>
      <div class="side_block">
        <div class="header"><h2>Course Menu</h2></div>
        <ul>
          <li><%= link_to 'Settings', :controller => 'courses', :action => 'edit', :id => @course %></li>
          <li><%= link_to 'Teachers', :controller => 'teachers', :action => 'list', :context => 'course', :id => @course %></li>
          <li><%= link_to 'Students', :controller => 'students', :action => 'list', :context => 'course', :id => @course %></li>
        </ul>
      </div>
      <% end -%>

    </div> <!-- main_nav -->

    <div id="content">

      <div id="main_content">
        <p id="flash_notice"><%= flash[:notice] %></p>
        <%= yield  %>
      </div> <!-- main_content -->

      <div id="secondary_content">

        <div class="side_block">
          <div class="header"><h2>My Astra</h2></div>
          <ul>
            <li><%= link_to 'My Profile', :controller => 'courses', :action => 'list' %></li>
            <li><%= link_to 'My Communities', :controller => 'communities', :action => 'list' %></li>
            <li><%= link_to 'My Contacts', :controller => 'contacts', :action => 'list' %></li>
            <li><%= link_to 'My Favourite LOs', :controller => 'contacts', :action => 'list' %></li>
          </ul>
        </div>

      </div> <!-- secondary_content -->

    </div> <!-- content -->


    <div id="footer">
    </div>

  </div> <!-- wrapper -->

</body>
</html>
